//
//  SecondViewController.m
//  视图控制器的生命周期
//
//  Created by 伍银荣 on 2020/6/18.
//  Copyright © 2020 com.example. All rights reserved.
//

#import "SecondViewController.h"

@interface SecondViewController ()

@end

@implementation SecondViewController

-(void)loadView {
    [super loadView];
    self.view.backgroundColor = [UIColor purpleColor];
    NSLog(@"SecondViewController - loadView");
}

- (void)viewDidLoad {
    [super viewDidLoad];
    NSLog(@"SecondViewController - viewDidLoad");
}

-(void)viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];
    NSLog(@"SecondViewController - viewDidAppear");
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    NSLog(@"SecondViewController - viewWillAppear");
}

-(void)viewDidDisappear:(BOOL)animated {
    [super viewDidDisappear:animated];
    NSLog(@"SecondViewController - viewDidDisappear");
}

-(void)viewWillDisappear:(BOOL)animated {
    [super viewWillDisappear:animated];
    NSLog(@"SecondViewController - viewWillDisappear");
}


-(void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    NSLog(@"SecondViewController");
    [self dismissViewControllerAnimated:YES completion:nil];
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
